package test;

import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.search.Query;
import lucene.Indexer;
import lucene.Lucenes;
import lucene.Searcher;

import org.apache.lucene.index.CorruptIndexException;

import extend.KeepOnlyLastTwoCommitDeletionPolicy;
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Administrator
 */
public class NewClass {

    public static void main(String[] args) throws ParseException {
        Query query = Searcher.createParsedQuery("content", "+date:[20040101 TO 20041231] Java AND (Jakarta OR Apache)");
        System.out.println(query.toString());
        query = Searcher.createParsedQuery("content", "\"good happy\"~100");
        System.out.println(query.toString());
         int index= new String("abc.exe").lastIndexOf(".");
         String postfix="abc.exe".substring(index+1);
         System.out.println(postfix);
       
    }
}
